// 交叉类型：出现两个或两个以上的类型，将两个或两个以上的类型合并为一个类型

type nerverType = string & number;

interface Teacher {
  name: string;
  age: number;
  skills: string[];
}

interface Doctor {
  name: string;
  age: string;
  talk: () => void;
}

// DoctorTeacher 类型包含了 Teacher 和 Doctor 的所有属性
type DoctorTeacher = Omit<Teacher & Doctor, "age"> & { age: string | number };

const dt: DoctorTeacher = {
  name: "zs",
  age: 18,
  skills: ["teach"],
  talk: () => {
    console.log("teach");
  },
};
